#include "stm32f10x.h"                  // Device header
#include "Delay.h"
#include "led.h"
#include "key.h"
#include "OLED.h"
#include "CountSensor.h"
#include "Timer.h"
#include "PWM.h"
#include "Servo.h"
#include "ADC.h"
int main()
{
	OLED_Init();
	uint16_t AD_Value[2];
	AD_Init_DMA(RCC_APB2Periph_ADC1, RCC_APB2Periph_GPIOA, GPIOA, GPIO_Pin_0 | GPIO_Pin_1, RCC_PCLK2_Div6, ADC1, ADC_SampleTime_55Cycles5, 
	ADC_Mode_Independent, ADC_DataAlign_Right, 2, (uint32_t)AD_Value, DMA1_Channel1);
	//增加路数：改数组大小，多或几个GPIO引脚，参数由2改成需要的数量，同时在函数内部进行相应修改
	while(1)
	{
		OLED_ShowNum(1,1,AD_Value[0],4);
		OLED_ShowNum(2,1,AD_Value[1],4);
		Delay_ms(100);
	}
}
